var send = new Vue({
	el:"#app",
	data:{
		cardid:'',
		cashcardList:''
	},
	//计算属性
	computed: {},
	//监听属性
	watch: {},
	//钩子函数
	created() {
		if (document.URL.indexOf("?") < 0) return; //获取当前url地址,如果没参数.直接返回
		var str = document.URL.split("?")[1];
		var obj = {};
		var arr;
		//当只有一个参数传过来时
		if (str.indexOf("&") < 0) {
			if (str.indexOf("=") < 0) return;
			arr = str.split("=");
			obj[arr[0]] = arr[1];
			this.cardid = obj
			return obj;
		}
	},
	mounted(){
		this.getCashcardList()
	},
	methods:{
		getCashcardList(){
			var that = this;
			s5.initData({
				url: '/cashcard-send-history',
				type:'post',
				data:{cate_id:this.cardid.cate_id}
			}, (res) => {
				var data = JSON.parse(res)
				that.cashcardList = data.data.list
			});
		}
	}
})
